UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NGskT95OEGzAcEctROKwGpRDEsA/ZLqFkzIluXaiwFw='
WHERE
key_id = 'e2f6bd5d00ac0b4d92a4db1bb76fd26e8c7e51e964b57a78704b36ebce062fac'
AND (
token = 'NGskT95OEGzAcEctROKwGpRDEsA/ZLqFkzIluXaiwFw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)