UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iXeC2wyGSk/+3dXfENUq2F9yHh1x7XWJ2B6HsXRk9/0='
WHERE
key_id = '01849253577bd4e4e72a778a97f42ab1dd55dfdd1949a4006f0d7b06b7c58fa8'
AND (
token = 'iXeC2wyGSk/+3dXfENUq2F9yHh1x7XWJ2B6HsXRk9/0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)