UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Qx7km6/qDYQ9VvF9jWUdKzUjMrPeobzed5BPWLFLe/Q='
WHERE
key_id = '81b826980be50582c9aea8f6bf2614443d07fef2cf8ba449a4b23ec8fd9ce784'
AND (
token = 'Qx7km6/qDYQ9VvF9jWUdKzUjMrPeobzed5BPWLFLe/Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)