UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JB+cw0+WOYXHGf5mrZz2In2YBxSGfJ81viTs1vZ3TsQ='
WHERE
key_id = '85ec088e3658bb62d51d41286ddc3e6eefff85f9b93f52969b44b16b32b086e4'
AND (
token = 'JB+cw0+WOYXHGf5mrZz2In2YBxSGfJ81viTs1vZ3TsQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)