UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5pzx/noFcAY96acLFK5vV8QXwkcbaFn0Eni9DjvOswU='
WHERE
key_id = '0b0ad1c21cc203d8d7a170a0bf56b2f3c2b8b1d153995a3ed6e2699a271e4ad3'
AND (
token = '5pzx/noFcAY96acLFK5vV8QXwkcbaFn0Eni9DjvOswU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)