UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'U+Smi89FGfe4Q1sxiZdTiXl5HvnmA2EfsGGAQcYkOUI='
WHERE
key_id = '956a7231b6b7ef4c510667aa71e4e2fc89cfdd3ab71b9868dcceec544f924a1b'
AND (
token = 'U+Smi89FGfe4Q1sxiZdTiXl5HvnmA2EfsGGAQcYkOUI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)