UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VSNsnigLr+PBkHI6zFHmtc3hryjngK6EgyLnQCNKKyU='
WHERE
key_id = '6dd2e425fea4e756296092685b3a6415393fbe9cce75be1d92ba36786e018575'
AND (
token = 'VSNsnigLr+PBkHI6zFHmtc3hryjngK6EgyLnQCNKKyU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)