UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WCkoPIPUibzCE0rk45rbtO6a/Qy8qsC2DQMST94h/WY='
WHERE
key_id = '9dc8966822d896b66f71c25ac291e1094eb163ab77fb211aabcb0a8c6b27a686'
AND (
token = 'WCkoPIPUibzCE0rk45rbtO6a/Qy8qsC2DQMST94h/WY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)