UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MpvOTFxSnTGp1C2TXzUFdN0s38Jkk6QxsfceOeqT4lE='
WHERE
key_id = 'e232b15960766f245d1f568b63a5c946153f166ec90933d2ff7dd0ebae367386'
AND (
token = 'MpvOTFxSnTGp1C2TXzUFdN0s38Jkk6QxsfceOeqT4lE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)