UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4KK1F78lor/ugGQGMCtIiDRWQMlNizJN+6hgYtDzfR8='
WHERE
key_id = '69ec68a22436ef1ed71966de2c9ccbe18b6ab723247d75adf19a48fa1ac8903e'
AND (
token = '4KK1F78lor/ugGQGMCtIiDRWQMlNizJN+6hgYtDzfR8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)