UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'J3piu/lg1m3fKCSccAgEzoUrqEUYQq9PPcWEy+lFyiw=' 
WHERE 
  key_id = '87d7101d5dbab48eef2eaeff840902edace7d99368ffe4bd999954241ae58de2' 
  AND (
    token = 'J3piu/lg1m3fKCSccAgEzoUrqEUYQq9PPcWEy+lFyiw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023