UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3j4VYkeVDk3OFIvhYQ/eZYoegsMhPXgevqQ/So5geoo=' 
WHERE 
  key_id = '70fcf714563109bf7544e071de737fff9924fc8cc011f1c6fbc6118ebe97cf61' 
  AND (
    token = '3j4VYkeVDk3OFIvhYQ/eZYoegsMhPXgevqQ/So5geoo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042