UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RLJLURk6Ex9lDfRVbpZRRdl7/djE7bADjLW8KveELVA='
WHERE
key_id = '5e0cf076b89ec894b10d21aec77cd0b622610f7b6486680b47da6a4bb9f524bd'
AND (
token = 'RLJLURk6Ex9lDfRVbpZRRdl7/djE7bADjLW8KveELVA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)