UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'x5HUVjKwzjL20fUK7vdc/jMi4g5Ye3xuVJizAnXdLKk=' 
WHERE 
  key_id = '333a73595d68d691eb94cb3816c2e1c79dbb271d2d7e5b3ece6eedd2bb71afb1' 
  AND (
    token = 'x5HUVjKwzjL20fUK7vdc/jMi4g5Ye3xuVJizAnXdLKk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029