UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4kRalIasHCcLzPFa8AJ6yEqn3ycYqp7b+xcHX6IzDNQ='
WHERE
key_id = '94a7ac63e806a737b83d4711ee125f3d9e96d42241feba932f35f64ddbba398e'
AND (
token = '4kRalIasHCcLzPFa8AJ6yEqn3ycYqp7b+xcHX6IzDNQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)