UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9AEbEjuCpgrIzTcRn7rm71++DPxujHcIEHil4ICQ/0s='
WHERE
key_id = '446873ba45cb96a9702f474247ef571da32695e97a8e4fddf53f4459481e352e'
AND (
token = '9AEbEjuCpgrIzTcRn7rm71++DPxujHcIEHil4ICQ/0s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)