UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PTBpBUlAwDOkh3pKJxlJCZGE9P75gKVsGI+AhtrDwpU='
WHERE
key_id = 'e6b47bd27293606f5be95a800e418ae8260a4ddec60dbd5cee8f8542992f1e08'
AND (
token = 'PTBpBUlAwDOkh3pKJxlJCZGE9P75gKVsGI+AhtrDwpU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)