UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4kSeakthTbY3pk1wPSO4+FsU6KQ6IocXCyNDXjD8mf8=' 
WHERE 
  key_id = '41443cd6e0d18509a69a4a7a8663c5ea97cd70e42d8b99b79f212fce7a4f2f15' 
  AND (
    token = '4kSeakthTbY3pk1wPSO4+FsU6KQ6IocXCyNDXjD8mf8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030