UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZGhsQlgqRNEGUtn+Na7VsDWyVV/hkyeRNHaZ5eNO1M4='
WHERE
key_id = '461056c6ba62a741e295f1ba471e4698df833895cfe1769c349b53e4dbb8811b'
AND (
token = 'ZGhsQlgqRNEGUtn+Na7VsDWyVV/hkyeRNHaZ5eNO1M4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)