UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VTNWKsJpdmrbxEHMIqpsevEPDKpB/ngq79BdFDvpEiY='
WHERE
key_id = 'fa3c3aac511c591f7d0cc6d9a3a4fdda448b2344bd68d963b1461e0e00ba0d6c'
AND (
token = 'VTNWKsJpdmrbxEHMIqpsevEPDKpB/ngq79BdFDvpEiY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)