UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tk4Uu4GpRo98yHSb7Imc3WKmymLlEePOWfjjvUUECqY='
WHERE
key_id = '55aef7adadd7c089ac09c67373dcff499a1283442cdf4f29003e6705653a00fd'
AND (
token = 'tk4Uu4GpRo98yHSb7Imc3WKmymLlEePOWfjjvUUECqY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)