UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/8GJsphIOWzZkXc2QcPQjxo5i2bZ4KYZiqE5ObSLWug='
WHERE
key_id = '2c6dce2cd45a0b842a0cc4b91ffa7a8283eda27133509d97521bdcfc90bcbdbf'
AND (
token = '/8GJsphIOWzZkXc2QcPQjxo5i2bZ4KYZiqE5ObSLWug='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)