UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ySP8ZSOvGC6rFA5WCzKdaxhb2LKs0jyMVK/vNJIosw8=' 
WHERE 
  key_id = '98ab94bccf745c83eb9fa644c53e5f919e6c21a80ceefd3f0873761434e3b4d2' 
  AND (
    token = 'ySP8ZSOvGC6rFA5WCzKdaxhb2LKs0jyMVK/vNJIosw8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025