UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zzwp06mYircGxDCsumxwUYE1OiaR/2kIFwkvNeIHXCM='
WHERE
key_id = 'f92554c6e6326d161813369df58e45eea51d05a19255b45648209e268014eb44'
AND (
token = 'zzwp06mYircGxDCsumxwUYE1OiaR/2kIFwkvNeIHXCM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)