UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cj78OpyaIo4EU/K1HQzOC9I94PO8Ttm2E9dWZBU0fe8='
WHERE
key_id = '25e86ad5cc700fd482d910154fd0240267b16bafd9b88089c655410105ebdf33'
AND (
token = 'cj78OpyaIo4EU/K1HQzOC9I94PO8Ttm2E9dWZBU0fe8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)