UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4v7WK1W6/Eo/7nkFsxfd8UeyD4OCfhNSA0NdT9YtSzo='
WHERE
key_id = '60ac0620dc00d0187118fb6fa80e3e4a593214c556fe643b6ad9f3bebf643899'
AND (
token = '4v7WK1W6/Eo/7nkFsxfd8UeyD4OCfhNSA0NdT9YtSzo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)