UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mOMj2mcCIbBBAsitjVhfmB/ZMbWsRywfH0tWXYERpqU='
WHERE
key_id = '1b0580f31ed087f4d3792c750d416037e07ae93f2ec61a5953c614fcda2bc28c'
AND (
token = 'mOMj2mcCIbBBAsitjVhfmB/ZMbWsRywfH0tWXYERpqU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)