UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6Ymvjh6EUPANZOu5Wh84faNG+B50qYyL6ISDOF9DUC0=' 
WHERE 
  key_id = '95bf3e0319dc71e83d3dc465dd73f46ecfbed4b31ec13f8b53e8f553825ab028' 
  AND (
    token = '6Ymvjh6EUPANZOu5Wh84faNG+B50qYyL6ISDOF9DUC0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033