UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PexS9fytNEII9OVaPJvwf9qD/5WDdfGTdB9gGIV0m1I='
WHERE
key_id = '0fbc96d7f68340f9a326af81718b5225105f5a058eaf67705dfe8a18c81934de'
AND (
token = 'PexS9fytNEII9OVaPJvwf9qD/5WDdfGTdB9gGIV0m1I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)