UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'el9Pl+G6drAQAPhi4xTG3KJ+gvhomJgJ2DqF2FbBOs0='
WHERE
key_id = '65e59eb1706c043ea6db96fc16d6a877e1d5398b66e00ef7f1d17cafb0824dc4'
AND (
token = 'el9Pl+G6drAQAPhi4xTG3KJ+gvhomJgJ2DqF2FbBOs0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)