UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1DEAIWN5XQFDBVJRCcqfrP/1DH25xFPL35V+pprgcbY='
WHERE
key_id = '7fecf5d0407d8c21fc7819d9cafbb1cd9459decccbdc82434cf4d64a3854faef'
AND (
token = '1DEAIWN5XQFDBVJRCcqfrP/1DH25xFPL35V+pprgcbY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)