UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+7/dXOh3jsozg2F2cMHyuPIXF7Nll/UiQjJiPJlHe4c='
WHERE
key_id = '903543951b3e5816b7690fd06ece95c886a3d743e33e4f1ecca9723446f060a2'
AND (
token = '+7/dXOh3jsozg2F2cMHyuPIXF7Nll/UiQjJiPJlHe4c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)