UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Nt/y7v2a4Q52DAuJx9bv2HYSCuVDuw286KtNu2V0ZlI='
WHERE
key_id = '45a0fb1fa90869e44ec326af8357763f3121680f07058776f1314b1147cfe716'
AND (
token = 'Nt/y7v2a4Q52DAuJx9bv2HYSCuVDuw286KtNu2V0ZlI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)