UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '95UoKjT5TeXv10gQ1QkSAgX/1enV5C9AAyG4dfJ+iNE=' 
WHERE 
  key_id = '68ed6729c6cbe61be8ba337e104981c7fbbbb249909d9e67248250b5e41da58c' 
  AND (
    token = '95UoKjT5TeXv10gQ1QkSAgX/1enV5C9AAyG4dfJ+iNE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032